package cn.tomoki.demo01.service;

import cn.tomoki.demo01.entity.Product;
import cn.tomoki.demo01.entity.ProductAppointOverview;
import cn.tomoki.demo01.mapper.ProductMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;

@Service
public class ProductServiceImpl implements ProductsService{
    @Autowired
    ProductMapper mapper;
    @Override
    public Collection<Product> getProductAll() {
//        Collection<Product> products = mapper.getProductAll();
//        System.out.println(products);
        return mapper.getProductAll();
    }

    @Override
    public Product getProductById(String id) {
        return mapper.getProductById(id);
    }

    @Override
    public Collection<ProductAppointOverview> getProductAppointOverview() {
        return mapper.getProductAppointOverview();
    }


}
